﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace CoreTools.DTO.TestDto
{
    /// <summary>
    /// 用户信息
    /// </summary>
   public class VUserInfoDto
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Required(ErrorMessage ="请输入用户Id")]
        [DisplayName("用户Id")]
        public int Id { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [Required(ErrorMessage = "请输入用户名称")]
        [DisplayName("用户名称")]
        [StringLength(10)]
        public string UserName { get; set; }

        /// <summary>
        /// 用户年龄
        /// </summary>
        [Required(ErrorMessage = "请输入用户年龄")]
        [DisplayName("用户年龄")]
        [Range(1,100,ErrorMessage ="请输入合法年龄段")]
        public string UserAge { get; set; }
    }
}
